package travelDreamEntities;

import java.io.Serializable;

import javax.persistence.*;

import dataTransferOblect.AmicononregistratoDTO;

import java.util.Set;


/**
 * The persistent class for the amicononregistrato database table.
 * 
 */
@Entity
@NamedQuery(name="Amicononregistrato.findAll", query="SELECT a FROM Amicononregistrato a")
public class Amicononregistrato implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static final String FIND_ALL = "Amicononregistrato.findAll";

	@Id
	private String email;

	private String nome;

	//bi-directional many-to-many association to Cliente
	@ManyToMany(mappedBy="amicononregistratos")
	private Set<Cliente> clientes;

	public Amicononregistrato() {
	}

	public Amicononregistrato(AmicononregistratoDTO amicononregistrato) {
		this.email=amicononregistrato.getEmail();
		this.nome=amicononregistrato.getNome();
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getNome() {
		return this.nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public Set<Cliente> getClientes() {
		return this.clientes;
	}

	public void setClientes(Set<Cliente> clientes) {
		this.clientes = clientes;
	}

}